#region Summary 

// 
// Owner : JackieHan 
// 
// Solution : LearnSolution
// 
// Project :JackieHan.Hibernate2.0.Data
// 
// File : NHibernateHelper.cs
// 
// CopyRight : Copyright © 2009-2010 JackieHan Personal, All Rights Reserved 
// 
// Summary : NHibernate辅助类
// 
// History : 
//			2010-08-18 00:28:56	    Create 
// 

#endregion

#region Using 

using System;
using System.Collections.Generic;
using NHibernate;
using NHibernate.Cfg;

#endregion

namespace JackieHan.Hibernate2.Data
{
    /// <summary> 
    /// NHibernate辅助类
    /// </summary> 
    public class NHibernateHelper
    {
        private static ISessionFactory sessionFactory;

        static NHibernateHelper()
        {
            sessionFactory = (new Configuration()).Configure().BuildSessionFactory();
        }

        public static ISession GetSession()
        {
            return sessionFactory.OpenSession();
        }
    }
}